/*
 Navicat Premium Data Transfer

 Source Server         : GYM
 Source Server Type    : MySQL
 Source Server Version : 80024
 Source Host           : 49.234.18.194:3306
 Source Schema         : gym

 Target Server Type    : MySQL
 Target Server Version : 80024
 File Encoding         : 65001

 Date: 29/06/2022 15:50:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for adminmenu
-- ----------------------------
DROP TABLE IF EXISTS `adminmenu`;
CREATE TABLE `adminmenu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单名',
  `parentId` int DEFAULT NULL COMMENT '父级菜单名',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of adminmenu
-- ----------------------------
BEGIN;
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (1, '订单中心', 0);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (2, '课程信息管理', 0);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (3, '新增课程', 2);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (4, '删除课程', 2);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (5, '课程查询', 2);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (6, '会员管理', 0);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (7, '会员信息', 6);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (8, '会员退课', 6);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (9, '会员注销', 6);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (10, '教练管理', 0);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (11, '教练信息录入', 10);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (12, '教练注销', 10);
INSERT INTO `adminmenu` (`id`, `name`, `parentId`) VALUES (13, '器材信息管理', 0);
COMMIT;

-- ----------------------------
-- Table structure for adminuser
-- ----------------------------
DROP TABLE IF EXISTS `adminuser`;
CREATE TABLE `adminuser` (
  `id` int NOT NULL AUTO_INCREMENT,
  `adminName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '管理员名字',
  `adminPassword` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '管理员密码',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of adminuser
-- ----------------------------
BEGIN;
INSERT INTO `adminuser` (`id`, `adminName`, `adminPassword`) VALUES (1, 'admin', 'cf1425350567');
INSERT INTO `adminuser` (`id`, `adminName`, `adminPassword`) VALUES (8, 'Jano', '123');
INSERT INTO `adminuser` (`id`, `adminName`, `adminPassword`) VALUES (9, 'Mark', '123');
INSERT INTO `adminuser` (`id`, `adminName`, `adminPassword`) VALUES (10, 'Emma', '123');
INSERT INTO `adminuser` (`id`, `adminName`, `adminPassword`) VALUES (11, 'Jack', '123');
INSERT INTO `adminuser` (`id`, `adminName`, `adminPassword`) VALUES (12, 'Teddy', '123');
COMMIT;

-- ----------------------------
-- Table structure for coach
-- ----------------------------
DROP TABLE IF EXISTS `coach`;
CREATE TABLE `coach` (
  `id` int NOT NULL AUTO_INCREMENT,
  `coachName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '教练名字',
  `coachPhone` bigint DEFAULT NULL COMMENT '教练手机号',
  `sexId` int DEFAULT NULL COMMENT '教练性别',
  `age` int DEFAULT NULL COMMENT '教练名字',
  `style` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '教练风格',
  `photo` varchar(255) DEFAULT NULL COMMENT '教练照片',
  `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '教练简介',
  `coachPassword` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of coach
-- ----------------------------
BEGIN;
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (2, '张起灵', 13243253432, 0, 22, '极速瘦身', 'http://49.234.18.194:8080/image/1.jpg', '', '11111');
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (3, '蓝忘机', 13324332344, 0, 20, '紧致塑型', 'http://49.234.18.194:8080/image/1.jpg', NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (4, '花城', 13324245453, 1, 25, '超级有氧', 'http://49.234.18.194:8080/image/1.jpg', NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (5, '婉儿', 13342244112, 1, 18, '冥想放松', 'http://49.234.18.194:8080/image/1.jpg', NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (6, '白凤九', 13433324335, 1, 20, '运动康复', 'http://49.234.18.194:8080/image/1.jpg', NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (7, '张含', 15299985622, 1, 35, '体态矫正', 'http://49.234.18.194:8080/image/1.jpg', NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (8, NULL, NULL, NULL, NULL, '游泳健身', NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (19, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (20, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (21, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (22, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (23, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (24, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (25, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (26, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (27, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (28, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (29, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (30, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `coach` (`id`, `coachName`, `coachPhone`, `sexId`, `age`, `style`, `photo`, `description`, `coachPassword`) VALUES (31, '曹峰', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for coachmenu
-- ----------------------------
DROP TABLE IF EXISTS `coachmenu`;
CREATE TABLE `coachmenu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单名',
  `parentId` int DEFAULT NULL COMMENT '父级菜单名',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of coachmenu
-- ----------------------------
BEGIN;
INSERT INTO `coachmenu` (`id`, `name`, `parentId`) VALUES (1, '个人信息', 0);
INSERT INTO `coachmenu` (`id`, `name`, `parentId`) VALUES (2, '课程安排', 0);
COMMIT;

-- ----------------------------
-- Table structure for collect
-- ----------------------------
DROP TABLE IF EXISTS `collect`;
CREATE TABLE `collect` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subjectId` int DEFAULT NULL COMMENT '课程Id',
  `memberId` int DEFAULT NULL COMMENT '会员id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of collect
-- ----------------------------
BEGIN;
INSERT INTO `collect` (`id`, `subjectId`, `memberId`) VALUES (2, 2, 1);
INSERT INTO `collect` (`id`, `subjectId`, `memberId`) VALUES (29, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for equipment
-- ----------------------------
DROP TABLE IF EXISTS `equipment`;
CREATE TABLE `equipment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备名称',
  `price` decimal(10,2) DEFAULT NULL COMMENT '设备价格',
  `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '设备描述',
  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '设备种类',
  `stateId` int DEFAULT NULL COMMENT '设备状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of equipment
-- ----------------------------
BEGIN;
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (1, '跑步机', 2000.00, '跑步神器', '跑步', 1);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (2, '动感单车', 3000.00, '快速瘦身', '骑行', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (3, '呼啦圈', 200.00, '紧致瘦身', '瘦身', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (10, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (11, '卧推架', 1000.00, '练胸器材', '练胸神器', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (12, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (13, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (14, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (15, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (16, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (17, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (18, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (19, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (20, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (21, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (22, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (23, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (24, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
INSERT INTO `equipment` (`id`, `name`, `price`, `description`, `type`, `stateId`) VALUES (25, '史密斯架', 1000.00, '好东西啊', '无氧器械', 0);
COMMIT;

-- ----------------------------
-- Table structure for member
-- ----------------------------
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
  `id` int NOT NULL AUTO_INCREMENT,
  `userName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户姓名',
  `userPhone` bigint DEFAULT NULL COMMENT '用户电话',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户密码',
  `balance` decimal(10,2) DEFAULT NULL COMMENT '用户钱包',
  `photo` varchar(255) DEFAULT NULL COMMENT '用户头像',
  `payPassword` varchar(255) DEFAULT NULL COMMENT '用户支付密码',
  `sexId` int DEFAULT NULL COMMENT '用户性别',
  `birth` date DEFAULT NULL COMMENT '用户生日',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of member
-- ----------------------------
BEGIN;
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (43, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-29');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (44, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-29');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (45, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-29');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (46, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-23');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (47, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-15');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (48, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-29');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (49, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-29');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (50, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-29');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (51, 'caofeng', 11, '111', 111.00, '111', '111', 1, '2022-06-29');
INSERT INTO `member` (`id`, `userName`, `userPhone`, `password`, `balance`, `photo`, `payPassword`, `sexId`, `birth`) VALUES (52, 'Jano', 123, '123', 123.00, 'http://49.234.18.194:8080/image/1.jpg ', '123', 1, '2021-01-01');
COMMIT;

-- ----------------------------
-- Table structure for membermenu
-- ----------------------------
DROP TABLE IF EXISTS `membermenu`;
CREATE TABLE `membermenu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '目录id',
  `name` varchar(255) DEFAULT NULL COMMENT '菜单名',
  `parentId` int DEFAULT NULL COMMENT '父级目录',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of membermenu
-- ----------------------------
BEGIN;
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (1, '个人信息', 0);
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (2, '课程管理', 0);
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (3, '查看课程表', 2);
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (4, '在线购买课程', 2);
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (5, '收藏课程', 2);
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (6, '购物车', 0);
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (7, '订单中心', 0);
INSERT INTO `membermenu` (`id`, `name`, `parentId`) VALUES (8, '我的钱包', 0);
COMMIT;

-- ----------------------------
-- Table structure for orders
-- ----------------------------
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subjectId` int DEFAULT NULL COMMENT '课程id',
  `memberId` int DEFAULT NULL COMMENT '会员id',
  `dealTime` date DEFAULT NULL COMMENT '成交时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of orders
-- ----------------------------
BEGIN;
INSERT INTO `orders` (`id`, `subjectId`, `memberId`, `dealTime`) VALUES (17, 2, 52, '2022-06-13');
INSERT INTO `orders` (`id`, `subjectId`, `memberId`, `dealTime`) VALUES (18, 4, 52, '2022-06-06');
INSERT INTO `orders` (`id`, `subjectId`, `memberId`, `dealTime`) VALUES (19, 1, 52, '2022-06-13');
COMMIT;

-- ----------------------------
-- Table structure for sex
-- ----------------------------
DROP TABLE IF EXISTS `sex`;
CREATE TABLE `sex` (
  `id` int NOT NULL COMMENT '性别id',
  `value` varchar(255) NOT NULL COMMENT '性别',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of sex
-- ----------------------------
BEGIN;
INSERT INTO `sex` (`id`, `value`) VALUES (0, '女');
INSERT INTO `sex` (`id`, `value`) VALUES (1, '男');
COMMIT;

-- ----------------------------
-- Table structure for state
-- ----------------------------
DROP TABLE IF EXISTS `state`;
CREATE TABLE `state` (
  `Id` int NOT NULL COMMENT '状态id',
  `value` varchar(255) DEFAULT NULL COMMENT '状态值',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of state
-- ----------------------------
BEGIN;
INSERT INTO `state` (`Id`, `value`) VALUES (0, '正常');
INSERT INTO `state` (`Id`, `value`) VALUES (1, '损坏');
INSERT INTO `state` (`Id`, `value`) VALUES (2, '维修中');
COMMIT;

-- ----------------------------
-- Table structure for subject
-- ----------------------------
DROP TABLE IF EXISTS `subject`;
CREATE TABLE `subject` (
  `subjectId` int NOT NULL AUTO_INCREMENT,
  `subjectName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '课程名称',
  `subjectPrice` double DEFAULT NULL COMMENT '课程价格',
  `coachId` int DEFAULT NULL COMMENT '教练的id',
  `startDate` date DEFAULT NULL COMMENT '起始时间',
  `endDate` date DEFAULT NULL COMMENT '结束时间',
  `duration` int DEFAULT NULL COMMENT '课程节数',
  `number` int DEFAULT NULL COMMENT '课程名额',
  `subjectPhoto` varchar(255) DEFAULT NULL COMMENT '课程图片',
  PRIMARY KEY (`subjectId`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of subject
-- ----------------------------
BEGIN;
INSERT INTO `subject` (`subjectId`, `subjectName`, `subjectPrice`, `coachId`, `startDate`, `endDate`, `duration`, `number`, `subjectPhoto`) VALUES (1, '健身球', 30, 2, '2022-06-23', '2022-10-02', 40, 20, 'http://49.234.18.194:8080/image/jianshenqiu.jpeg');
INSERT INTO `subject` (`subjectId`, `subjectName`, `subjectPrice`, `coachId`, `startDate`, `endDate`, `duration`, `number`, `subjectPhoto`) VALUES (2, '跑步机', 35, 3, '2022-09-03', '2022-10-03', 20, 20, 'http://49.234.18.194:8080/image/run.jpeg');
INSERT INTO `subject` (`subjectId`, `subjectName`, `subjectPrice`, `coachId`, `startDate`, `endDate`, `duration`, `number`, `subjectPhoto`) VALUES (4, '压力车', 50, 4, '2022-10-23', '2022-12-01', 30, 20, 'http://49.234.18.194:8080/image/yalicar.jpeg');
INSERT INTO `subject` (`subjectId`, `subjectName`, `subjectPrice`, `coachId`, `startDate`, `endDate`, `duration`, `number`, `subjectPhoto`) VALUES (5, '仰卧起坐', 20, 5, '2022-07-03', '2022-08-01', 15, 20, 'http://49.234.18.194:8080/image/yangwo.jpeg');
INSERT INTO `subject` (`subjectId`, `subjectName`, `subjectPrice`, `coachId`, `startDate`, `endDate`, `duration`, `number`, `subjectPhoto`) VALUES (6, '健身操', 50, 6, '2022-08-04', '2022-09-23', 10, 20, 'http://49.234.18.194:8080/image/ex.jpeg');
INSERT INTO `subject` (`subjectId`, `subjectName`, `subjectPrice`, `coachId`, `startDate`, `endDate`, `duration`, `number`, `subjectPhoto`) VALUES (27, '拳击课', 40, 2, '2022-08-01', '2022-10-22', 30, 20, 'http://49.234.18.194:8080/image/quanji.jpeg');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
